<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Generator" content="Asbru Web Content Editor">
<meta http-equiv="Copyright" content="(C) 2002-2006 - Asbru Ltd. - www.asbrusoft.com">
<script type="text/javascript" src="webeditor.properties.js"></script>
<title>Asbru Web Content Editor</title>
<link rel="stylesheet" href="../dtree.css" type="text/css">
<script type="text/javascript" src="../dtree.js"></script>
<link rel="stylesheet" type="text/css" href="../hardcore.css"> 
<link rel="stylesheet" type="text/css" href="webeditor.css">
<script type="text/javascript">

document.title = HtmlDecode(Text('medialist_title'));

function requestParameter(name) {
	var value = "";
	if (start = request.indexOf("?"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	} else if (start = request.indexOf("&"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	}
	if (value.indexOf("&")+1) {
		value = value.substring(0, value.indexOf("&"));
	}
	value = unescape(value);
	return value;
}

var request = "" + window.location;
editor = requestParameter("editor");
request_title = requestParameter("title");
request_category = requestParameter("category");

function openit(title, href, mediaclass) {
	if (! mediaclass) {
		if (href.substring(href.length-4) == ".swf") {
			mediaclass = "flash";
		} else if (href.substring(href.length-6) == ".class") {
			mediaclass = "applet";
		} else {
			mediaclass = "image";
		}
	}
	if (href != "") {
		parent.tag["href"] = href;
		parent.tag["mediaclass"] = mediaclass;
		parent.ready_href = href;
		parent.ready_mediaclass = mediaclass
		if (matches = href.match(/id=(\d+)\D*$/)) {
			id = matches[1];
		} else {
			id = '';
		}
<?php if (($upload_path <> "") && ($enable_upload == "yes")) { ?>
		if (document.getElementById) {
			if (document.getElementById('create_file')) document.getElementById('create_file').href = 'mediauploader.php?id='+id+'&action=Create&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
			if (request_title != "") {
				if (document.getElementById('update_file')) document.getElementById('update_file').href = 'mediauploader.php?id='+id+'&action=Update&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
				if (document.getElementById('delete_file')) document.getElementById('delete_file').href = 'mediauploader.php?id='+id+'&action=Delete&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor + '&href='+escape(href);
			}
		} else {
			if (document.all['create_file']) document.all['create_file'].href = 'mediauploader.php?id='+id+'&action=Create&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
			if (request_title != "") {
				if (document.all['update_file']) document.all['update_file'].href = 'mediauploader.php?id='+id+'&action=Update&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
				if (document.all['delete_file']) document.all['delete_file'].href = 'mediauploader.php?id='+id+'&action=Delete&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor + '&href='+escape(href);
			}
		}
<?php } ?>
	}
	if (parent.mediapreview && parent.mediapreview.location) parent.mediapreview.location.href = 'mediapreview.php?editor=' + editor + '&title='+escape(title)+'&href='+escape(href)+'&mediaclass='+escape(mediaclass);
	if (parent.mediainsert && parent.mediainsert.location) parent.mediainsert.location.href = 'mediainsert.php?editor=' + editor + '&action=server&title='+escape(title)+'&href='+escape(href)+'&mediaclass='+escape(mediaclass);
}

</script>
</head>
<body onLoad="parent.medialist_ready();">
<div class="dtree">
<?php if (($upload_path <> "") && ($enable_upload == "yes")) { ?>
<script type="text/javascript">
	document.writeln('<a id="create_file" target="mediainsert" href="mediauploader.php?action=Create&category=' + escape(request_category) + '&editor=' + editor + '"><img src="../dtree/page.gif">' + Text('medialist_create') + '<\/a>');
	if (request_title != "") {
		document.writeln('<a id="update_file" target="mediainsert" href="javascript:alert(\'' + HtmlDecode(Text('medialist_updateimage')) + '\');"><img src="../dtree/page.gif">' + Text('medialist_update') + '<\/a>');
		document.writeln('<a id="delete_file" target="mediainsert" href="javascript:alert(\'' + HtmlDecode(Text('medialist_deleteimage')) + '\');"><img src="../dtree/trash.gif">' + Text('medialist_delete') + '<\/a>');
	}
</script>
<?php } else { ?>
<script type="text/javascript">
	document.writeln('<a id="create_file" target="mediainsert" href="javascript:alert(HtmlDecode(Text(\'disabled\')));"><img src="../dtree/page.gif">' + Text('medialist_create') + '<\/a>');
	if (request_title != "") {
		document.writeln('<a id="update_file" target="mediainsert" href="javascript:alert(HtmlDecode(Text(\'disabled\')));"><img src="../dtree/page.gif">' + Text('medialist_update') + '<\/a>');
		document.writeln('<a id="delete_file" target="mediainsert" href="javascript:alert(HtmlDecode(Text(\'disabled\')));"><img src="../dtree/trash.gif">' + Text('medialist_delete') + '<\/a>');
	} else {
		document.writeln('&nbsp;');
	}
</script>
<?php } ?>
</div>
<hr>
<div class="dtree">
	<script type="text/javascr